package com.sophialex.health.record.ui.baseinfo;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.DateTime;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.part.ViewPart;

import com.sophialex.health.common.platform.SuperContext;
import com.sophialex.health.record.Messages;
import com.sophialex.health.record.common.draw.DesignUI;
import com.sophialex.health.record.common.draw.UIFormAttachment;
import com.sophialex.health.record.common.utils.CommonUtils;
import com.sophialex.health.record.common.utils.ImageUtil;

/**
 * 健康体检UI
 * <p>Title:Health</p>
 * <p>YearCheckUI</p>
 * 
 * Alex May 23, 2011 3:15:37 PM create
 * @author <a href='wanghao924@126.com'>Alex</a>
 * QQ: 873987060;
 * @version 1.0
 */
public abstract class YearCheckUI extends ViewPart {
	public static final String ID = "com.sophialex.health.record.ui.baseinfo.YearCheckUI"; 
    
	private final FormToolkit toolkit = new FormToolkit(Display.getCurrent());
	
	private Label lab_jcrq;
	private Label lab_zrys;
	private FormData fd_combo;
	private Label lab_sg,lbl_cm;
	private Label lb_yy,lb_tz,lb_pf,lb_lb,lb_jzx,lb_jz,lb_gj,lb_sz,lb_ptz,lb_szq,lb_gm,lb_san,lb_wkother,lb_rx,lb_jl,lb_ys;
	private Label lb_xy,lb_xl,lb_xin,lb_fei,lb_sjjs,lb_fb,lb_gan,lb_pi,lb_jl_nk,lb_ys_nk,lb_wy,lb_yd,lb_gongj,lb_fuj,lb_zg;
	private Label lb_ys_fk,lb_jl_fk,lb_lyz,lb_lyy,lb_jzz,lb_jzy,lb_er,lb_bi,lb_kou,lb_ys_wgk,lb_jl_wgk,lb_fxx,lb_fxx_ysjz;
	private Label lb_xdt,lb_xdt_ysjz,lb_bc,lb_bc_ysqz,lb_kfxt,lb_kfxt_ysqz,lb_xz,lb_xg,lb_xz_ysqz,lb_ygbzw_ysqz;
	private Label lb_ggn,lb_ggn_ysqz,lb_xcg,lb_xcg_ysqz,lb_ncg,lb_ncg_ysqz,lb_fcg,lb_fcg_ysqz,lb_qt,lb_qt_ysqz,lb_jcjl,lb_zjys;
	private Label lb_HBsAg,lb_HBeAg,lb_HbsAb,lb_HbeAb,lb_HBcAb;

	
	
	
	private boolean man = true;  //是否为男 
	private Group group;
	protected DateTime txt_jcrq;  //检查日期
	
	protected Combo combo_zrys;  //责任医生
	
	protected Text txt_zzother; //症状其他
	
	protected Text txt_sg; //身高

	protected Text txt_yy; //营养

	protected Text txt_tz; //体重

	protected Combo combo_pf; //皮肤
	
	protected Combo combo_lb; //淋巴

	protected Combo combo_jzx; //甲状腺
	
	protected Text txt_jz; //脊柱
	
	protected Text txt_gj; //关节
	
	protected Text txt_sz; //四肢
	
	protected Text txt_ptz; //平跖足
	
	protected Text txt_szq; //泌尿生殖器
	
	protected Combo combo_gm; //肛门
	
	protected Text txt_san;//疝
	
	protected Text txt_wkother; //外科 其他
	
	protected Text txt_rx; // 乳腺
	
	protected Text txt_jl; // 外科检测结论
	
	protected Text txt_ys; // 外科检测医生
	
	protected Text txt_xy; // 血压
	
	protected Text txt_xl; // 心率
	
	protected Text txt_xin; // 心 
	
	protected Text txt_fei; // 肺
	
	protected Text txt_sjjs; // 神经及精神
	
	protected Text txt_fb; //腹 部
	
	protected Text txt_gan; //肝
	
	protected Text txt_pi; //脾
	
	protected Text txt_jl_nk; // 内科检测结论
	
	protected Text txt_ys_nk; // 内科检测医生
	
	protected Text txt_wy; //外阴
	
	protected Text txt_yd; //阴道
	
	protected Text txt_zg; //子宫
	
	protected Text txt_gongj; //宫颈
	
	protected Text txt_fuj; //附件
	
	protected Text txt_jl_fk; // 妇科检测结论
	
	protected Text txt_ys_fk; // 妇科检测医生
	
	protected Text txt_lyz; // 裸眼视力 左
	
	protected Text txt_lyy; // 裸眼视力 右
	
	protected Text txt_jzz; // 矫正视力 左
	
	protected Text txt_jzy; // 矫正视力 右
	
	protected Text txt_er; // 耳
	
	protected Text txt_bi; // 鼻
	
	protected Text txt_kou; // 口腔
	
	protected Text txt_jl_wgk; // 五官科检测结论
	
	protected Text txt_ys_wgk; // 五官科检测医生
	
	protected Text txt_fxx; // 肺X线

	protected Text txt_fxx_ysjz; // 肺X线  医生签字
	
	protected Text txt_xdt; // 心电图

	protected Text txt_xdt_ysjz; // 心电图  医生签字
	
	protected Text txt_bc; //B超

	protected Text txt_bc_ysqz; // B超  医生签字
	
	protected Text txt_kfxt; // 空腹血糖

	protected Text txt_kfxt_ysqz; // 空腹血糖  医生签字
	
	protected Text txt_gyz; // 甘油三酯值
	
	protected Text txt_zdgc; // 总胆固醇值
	
	protected Text txt_xz_ysqz; // 血脂  医生签字
	
	protected Text txt_ygbzw_ysqz; // 乙肝病毒血清标志物  医生签字
	
	protected Combo combo_HBsAg;  //HBsAg
	
	protected Combo combo_HBeAg;  //HBeAg
	
	protected Combo combo_HbsAb;  //HbsAb
	
	protected Combo combo_HbeAb; //HbeAb
	  
	protected Combo combo_HBcAb; //HBcAb
	
	protected Text txt_ggn; //肝功能

	protected Text txt_ggn_ysqz; // 肝功能  医生签字
	
	protected Text txt_xcg; //血常规

	protected Text txt_xcg_ysqz; // 血常规  医生签字
	
	protected Text txt_ncg; //尿常规

	protected Text txt_ncg_ysqz; // 尿常规  医生签字
	
	protected Text txt_fcg; //粪常规

	protected Text txt_fcg_ysqz; // 粪常规  医生签字
	
	protected Text txt_qt; //其他

	protected Text txt_qt_ysqz; // 其他  医生签字
	
	protected Text txt_jcjl; // 最后检查结论
	
	protected Text txt_zjys; // 主检医生
	
	public YearCheckUI() {
	}

	private Composite composite_1;



	protected ToolItem toolItemEdit;

	protected ToolItem toolItemDel;

	protected ToolItem toolItemSave;

	protected ToolItem toolItemCancel;

	protected ToolItem toolItemAdd;

	protected ToolItem toolItemExit;

	protected enum YearCheckViewState {
		ADD_VIEW, EDIT_VIEW, SHOW_VIEW;
	}

	/**
	 * Create contents of the view part.
	 * 
	 * @param parent
	 */
	@Override
	public void createPartControl(Composite parent) {
		Composite container = new Composite(parent, SWT.NONE);
		container.setLayout(new FormLayout());
		{
			composite_1 = new Composite(container, SWT.NONE);
			composite_1.setLayout(new FillLayout(SWT.HORIZONTAL));
			{
				FormData formData = new FormData();
				formData.height = 50;
				formData.right = new FormAttachment(100);
				formData.top = new FormAttachment(0);
				formData.left = new FormAttachment(0);
				composite_1.setLayoutData(formData);
			}
			{
				ToolBar toolBar = new ToolBar(composite_1, SWT.FLAT | SWT.NONE);
				toolBar.setBackgroundImage(ImageUtil.TBBJ);
//				{
//					toolItemAdd = new ToolItem(toolBar, SWT.NONE);
//					toolItemAdd.setText(Messages.getString("RecordUI.0")); //$NON-NLS-1$
//					toolItemAdd.setImage(ImageUtil.add);
//					toolItemAdd.addSelectionListener(new SelectionAdapter() {
//						@Override
//						public void widgetSelected(SelectionEvent e) {
//							doAdd();
//						}
//					});
//				}
				{
					toolItemEdit = new ToolItem(toolBar, SWT.NONE);
					toolItemEdit.setText(Messages.getString("RecordUI.1")); //$NON-NLS-1$
					toolItemEdit.setImage(ImageUtil.edit);
					toolItemEdit.addSelectionListener(new SelectionAdapter() {
						@Override
						public void widgetSelected(SelectionEvent e) {
							doEdit();
						}
					});
				}
				{
					toolItemDel = new ToolItem(toolBar, SWT.NONE);
					toolItemDel.setText(Messages.getString("RecordUI.2")); //$NON-NLS-1$
					toolItemDel.setImage(ImageUtil.delete);
					toolItemDel.addSelectionListener(new SelectionAdapter() {
						@Override
						public void widgetSelected(SelectionEvent e) {
							doDel();
						}
					});
				}
				{
					@SuppressWarnings("unused")
					ToolItem toolItem = new ToolItem(toolBar, SWT.SEPARATOR);
				}
				{
					toolItemSave = new ToolItem(toolBar, SWT.NONE);
					toolItemSave.setText(Messages.getString("RecordUI.3")); //$NON-NLS-1$
					toolItemSave.addSelectionListener(new SelectionAdapter() {
						@Override
						public void widgetSelected(SelectionEvent e) {
							doSave();
						}
					});
					toolItemSave.setImage(ImageUtil.save);
				}

				{
					toolItemCancel = new ToolItem(toolBar, SWT.NONE);
					toolItemCancel.setText(Messages.getString("RecordUI.4")); //$NON-NLS-1$
					toolItemCancel.addSelectionListener(new SelectionAdapter() {
						@Override
						public void widgetSelected(SelectionEvent e) {
							doCancel();
						}
					});
					toolItemCancel.setImage(ImageUtil.cancel);
				}
				{
					toolItemExit = new ToolItem(toolBar, SWT.NONE);
					toolItemExit.setText(Messages.getString("RecordUI.6")); //$NON-NLS-1$
					toolItemExit.addSelectionListener(new SelectionAdapter() {
						@Override
						public void widgetSelected(SelectionEvent e) {
							doExit();
						}
					});
					toolItemExit.setImage(ImageUtil.exit);
				}
				/*
				 * { ToolItem toolItem = new ToolItem(toolBar, SWT.NONE);
				 * toolItem.setText(Messages.getString("RecordUI.5"));
				 * //$NON-NLS-1$ toolItem.setImage(ImageUtil.print);
				 * toolItem.addSelectionListener(new SelectionAdapter() {
				 * 
				 * @Override public void widgetSelected(SelectionEvent e) {
				 * doPrint(); } }); }
				 */
			}
		}

		{
			Composite composite = new Composite(container, SWT.NONE);
			{
				FormData formData = new FormData();
				formData.top = new FormAttachment(composite_1, 0);
				formData.bottom = new FormAttachment(100, -4);
				formData.right = new FormAttachment(composite_1, 0, SWT.RIGHT);
				formData.left = new FormAttachment(composite_1, 0, SWT.LEFT);
				composite.setLayout(new FillLayout(SWT.FILL));
				composite.setLayoutData(formData);
				
			}
			drawUI(composite);
		}
		initCombo();
		createActions();
		initializeToolBar();
		initializeMenu();

		this.setPartName(Messages.getString("YearCheck.Title")); //$NON-NLS-1$
 
	}
    
	//绘制界面
	private void drawUI(Composite parent){
		ScrolledComposite scrolledComposite = new ScrolledComposite(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
		toolkit.adapt(scrolledComposite);
		toolkit.paintBordersFor(scrolledComposite);
		scrolledComposite.setExpandHorizontal(true);
		scrolledComposite.setExpandVertical(true);
		
		ScrolledForm scrldfrmNewScrolledform = toolkit.createScrolledForm(scrolledComposite);
		toolkit.paintBordersFor(scrldfrmNewScrolledform);
		scrldfrmNewScrolledform.setText("   姓名：张三             个人档案编号：152877552142211");
		scrldfrmNewScrolledform.getBody().setLayout(new FormLayout());
		Label horLine =  new Label(scrldfrmNewScrolledform.getBody(), SWT.SEPARATOR | SWT.HORIZONTAL);
		FormData fd_horLine = new FormData();
		fd_horLine.top = new FormAttachment(0, 10);
		fd_horLine.left = new FormAttachment(2, 0);
		fd_horLine.right = new FormAttachment(100,-10);
		horLine.setLayoutData(fd_horLine);
		toolkit.adapt(horLine, true, true);
		
		//检查日期
		{
			lab_jcrq = toolkit.createLabel(scrldfrmNewScrolledform.getBody(), "检查日期：", SWT.NONE);
			FormData fd_label = new FormData();
			fd_label.top = new FormAttachment(0, 35);
			fd_label.left = new FormAttachment(2, 0);
			lab_jcrq.setLayoutData(fd_label);
			
				
			txt_jcrq = new DateTime(scrldfrmNewScrolledform.getBody(), SWT.BORDER | SWT.DROP_DOWN);
			FormData fd_txtNewText = new FormData();
			fd_txtNewText.right = new FormAttachment(lab_jcrq, 166, SWT.RIGHT);
			fd_txtNewText.top = new FormAttachment(lab_jcrq,-8,SWT.TOP);
			fd_txtNewText.bottom = new FormAttachment(lab_jcrq,0,SWT.BOTTOM);
			fd_txtNewText.left = new FormAttachment(lab_jcrq, 6);
			txt_jcrq.setLayoutData(fd_txtNewText);
			toolkit.adapt(txt_jcrq, true, true);
		}
		//责任医生
		{
			lab_zrys = toolkit.createLabel(scrldfrmNewScrolledform.getBody(), "责任医生：", SWT.NONE);
			FormData fd_label_zrys = new FormData();
			fd_label_zrys.left = new FormAttachment(txt_jcrq, 140);
			fd_label_zrys.top = new FormAttachment(lab_jcrq,0,SWT.TOP);
			lab_zrys.setLayoutData(fd_label_zrys);
			
			combo_zrys = new Combo(scrldfrmNewScrolledform.getBody(), SWT.NONE);
			fd_combo = new FormData();
			fd_combo.top = new FormAttachment(txt_jcrq,0,SWT.TOP);
			fd_combo.right = new FormAttachment(lab_zrys, 166, SWT.RIGHT);
			fd_combo.left = new FormAttachment(lab_zrys, 6);
			combo_zrys.setLayoutData(fd_combo);
			toolkit.adapt(combo_zrys);
			toolkit.paintBordersFor(combo_zrys);
		}
		
		Section zzSection = toolkit.createSection(scrldfrmNewScrolledform.getBody(), Section.DESCRIPTION | Section.TITLE_BAR);
		fd_combo.bottom = new FormAttachment(zzSection, -20);
		FormData fd_sctnNewSection = new FormData();
//		fd_sctnNewSection.bottom = new FormAttachment(0,180);
		fd_sctnNewSection.right = new FormAttachment(100, -10);
		fd_sctnNewSection.top = new FormAttachment(lab_jcrq,20);
		fd_sctnNewSection.left = new FormAttachment(lab_jcrq,0,SWT.LEFT);
		zzSection.setLayoutData(fd_sctnNewSection);
		toolkit.paintBordersFor(zzSection);
		zzSection.setText("症状");
		
		Composite composite = toolkit.createComposite(zzSection, SWT.NONE);
		toolkit.paintBordersFor(composite);
		zzSection.setClient(composite);
		composite.setLayout(new FormLayout());
		
		//症状
		Button[] zzButtons = CommonUtils.initCheckBoxUI(toolkit, composite, null, "ZZHUANG", new int[] {28}, null, "drinkWater",10);
		
		{
			txt_zzother = toolkit.createText(composite, "", SWT.NONE);
			FormData fd_zzother = new FormData();
			fd_zzother.right = new FormAttachment(zzButtons[zzButtons.length-1], 166, SWT.RIGHT);
			fd_zzother.bottom = new FormAttachment(zzButtons[zzButtons.length-1],0,SWT.BOTTOM);
			fd_zzother.left = new FormAttachment(zzButtons[zzButtons.length-1]);
			txt_zzother.setLayoutData(fd_zzother);
			
		}
		
		Section wkSection = toolkit.createSection(scrldfrmNewScrolledform.getBody(), Section.TWISTIE| Section.TITLE_BAR);
		FormData fd_wkSection = new FormData();
		fd_wkSection.top = new FormAttachment(zzSection, 30);
		fd_wkSection.left = new FormAttachment(zzSection,0,SWT.LEFT);
		fd_wkSection.right = new FormAttachment(zzSection, 0, SWT.RIGHT);
		wkSection.setLayoutData(fd_wkSection);
		toolkit.paintBordersFor(wkSection);
		wkSection.setText("外科");
		wkSection.setExpanded(true);
		
		Composite composite_wk = toolkit.createComposite(wkSection, SWT.NONE);
		toolkit.paintBordersFor(composite_wk);
		wkSection.setClient(composite_wk);
		composite_wk.setLayout(new FormLayout());
		//身高
		{
			lab_sg = toolkit.createLabel(composite_wk, "身高：", SWT.NONE);
			FormData fd_lab_sh = new FormData();
			fd_lab_sh.top = new FormAttachment(0,20);
			fd_lab_sh.left = new FormAttachment(0);
			lab_sg.setLayoutData(fd_lab_sh);
			
			txt_sg = toolkit.createText(composite_wk, "", SWT.NONE);
			FormData fd_txtNewText = new FormData();
			fd_txtNewText.right = new FormAttachment(lab_sg, 166, SWT.RIGHT);
			fd_txtNewText.top = new FormAttachment(lab_sg, -8, SWT.TOP);
			fd_txtNewText.bottom = new FormAttachment(lab_sg,0,SWT.BOTTOM);
			fd_txtNewText.left = new FormAttachment(lab_sg, 6);
			txt_sg.setLayoutData(fd_txtNewText);
			
			lbl_cm = toolkit.createLabel(composite_wk, "cm", SWT.NONE);
			FormData fd_lblNewLabel = new FormData();
			fd_lblNewLabel.left = new FormAttachment(txt_sg, 3);
			fd_lblNewLabel.bottom = new FormAttachment(lab_sg, 0, SWT.BOTTOM);
			lbl_cm.setLayoutData(fd_lblNewLabel);

		}
		
		//营养
		{
			lb_yy = toolkit.createLabel(composite_wk, "营养：", SWT.NONE);
			FormData fd_lblNewLabel_1 = new FormData();
			fd_lblNewLabel_1.left = new FormAttachment(txt_sg, 40);
			fd_lblNewLabel_1.bottom = new FormAttachment(lab_sg, 0, SWT.BOTTOM);
			lb_yy.setLayoutData(fd_lblNewLabel_1);
			
			txt_yy = toolkit.createText(composite_wk, "", SWT.NONE);
			FormData fd_txt_yy = new FormData();
			fd_txt_yy.right = new FormAttachment(lb_yy, 166, SWT.RIGHT);
			fd_txt_yy.top = new FormAttachment(lb_yy, -8, SWT.TOP);
			fd_txt_yy.bottom = new FormAttachment(lb_yy,0,SWT.BOTTOM);
			fd_txt_yy.left = new FormAttachment(lb_yy, 6);
			txt_yy.setLayoutData(fd_txt_yy);
			
		}
		//体重
		{
			lb_tz = toolkit.createLabel(composite_wk, "体重：", SWT.NONE);
			FormData fd_lb_tz = new FormData();
			fd_lb_tz.left = new FormAttachment(txt_yy, 40);
			fd_lb_tz.bottom = new FormAttachment(txt_yy, 0, SWT.BOTTOM);
			lb_tz.setLayoutData(fd_lb_tz);
			
			txt_tz = toolkit.createText(composite_wk, "", SWT.NONE);
			FormData fd_txt_tz = new FormData();
			fd_txt_tz.right = new FormAttachment(lb_tz, 166, SWT.RIGHT);
			fd_txt_tz.top = new FormAttachment(lb_tz, -8, SWT.TOP);
			fd_txt_tz.bottom = new FormAttachment(lb_tz,0,SWT.BOTTOM);
			fd_txt_tz.left = new FormAttachment(lb_tz, 6);
			txt_tz.setLayoutData(fd_txt_tz);
		}

		//皮肤
		{
			lb_pf = toolkit.createLabel(composite_wk, "皮肤：", SWT.NONE);
			FormData fd_lb_pf = new FormData();
			fd_lb_pf.left = new FormAttachment(txt_tz, 40);
			fd_lb_pf.bottom = new FormAttachment(txt_tz, 0, SWT.BOTTOM);
			lb_pf.setLayoutData(fd_lb_pf);
			
			combo_pf =  new Combo(composite_wk, SWT.READ_ONLY);
			FormData fd_txt_pf = new FormData();
			fd_txt_pf.right = new FormAttachment(lb_pf, 166, SWT.RIGHT);
			fd_txt_pf.top = new FormAttachment(lb_pf, -8, SWT.TOP);
			fd_txt_pf.bottom = new FormAttachment(lb_pf,0,SWT.BOTTOM);
			fd_txt_pf.left = new FormAttachment(lb_pf, 6);
			combo_pf.setLayoutData(fd_txt_pf);
		}

		//淋巴
		{
			lb_lb = toolkit.createLabel(composite_wk, "淋巴：", SWT.NONE);
			FormData fd_lb_lb = new FormData();
			fd_lb_lb.left = new FormAttachment(lab_sg,0,SWT.LEFT);
			fd_lb_lb.top = new FormAttachment(lab_sg,40, SWT.TOP);
			lb_lb.setLayoutData(fd_lb_lb);
			
			combo_lb =  new Combo(composite_wk, SWT.READ_ONLY);
			FormData fd_combo_lb = new FormData();
			fd_combo_lb.right = new FormAttachment(lb_lb, 166, SWT.RIGHT);
			fd_combo_lb.top = new FormAttachment(lb_lb, -8, SWT.TOP);
			fd_combo_lb.bottom = new FormAttachment(lb_lb,0,SWT.BOTTOM);
			fd_combo_lb.left = new FormAttachment(lb_lb, 6);
			combo_lb.setLayoutData(fd_combo_lb);
		}
		
		//甲状腺
		{
			lb_jzx = toolkit.createLabel(composite_wk, "甲状腺：", SWT.NONE);
			FormData fd_lb_jzx = new FormData();
			fd_lb_jzx.right = new FormAttachment(lb_yy,0,SWT.RIGHT);
			fd_lb_jzx.bottom = new FormAttachment(combo_lb,0, SWT.BOTTOM);
			lb_jzx.setLayoutData(fd_lb_jzx);
			
			combo_jzx =  new Combo(composite_wk, SWT.READ_ONLY);
			FormData fd_combo_jzx = new FormData();
			fd_combo_jzx.right = new FormAttachment(lb_jzx, 166, SWT.RIGHT);
			fd_combo_jzx.top = new FormAttachment(lb_jzx, -8, SWT.TOP);
			fd_combo_jzx.bottom = new FormAttachment(lb_jzx,0,SWT.BOTTOM);
			fd_combo_jzx.left = new FormAttachment(lb_jzx, 6);
			combo_jzx.setLayoutData(fd_combo_jzx);
		}
		
		//脊 柱
		{
			lb_jz = toolkit.createLabel(composite_wk, "脊柱：", SWT.NONE);
			FormData fd_lb_jz = new FormData();
			fd_lb_jz.right = new FormAttachment(lb_tz,0,SWT.RIGHT);
			fd_lb_jz.bottom = new FormAttachment(combo_jzx,0, SWT.BOTTOM);
			lb_jz.setLayoutData(fd_lb_jz);
			
			txt_jz = toolkit.createText(composite_wk, "", SWT.NONE);
			FormData fd_txt_jz = new FormData();
			fd_txt_jz.right = new FormAttachment(lb_jz, 166, SWT.RIGHT);
			fd_txt_jz.top = new FormAttachment(lb_jz, -8, SWT.TOP);
			fd_txt_jz.bottom = new FormAttachment(lb_jz,0,SWT.BOTTOM);
			fd_txt_jz.left = new FormAttachment(lb_jz, 6);
			txt_jz.setLayoutData(fd_txt_jz);
		}
		
		//关节
		{
			lb_gj = toolkit.createLabel(composite_wk, "关节：", SWT.NONE);
			FormData fd_lb_gj = new FormData();
			fd_lb_gj.right = new FormAttachment(lb_pf,0,SWT.RIGHT);
			fd_lb_gj.bottom = new FormAttachment(txt_jz,0, SWT.BOTTOM);
			lb_gj.setLayoutData(fd_lb_gj);
			
			txt_gj = toolkit.createText(composite_wk, "", SWT.NONE);
			FormData fd_txt_gj = new FormData();
			fd_txt_gj.right = new FormAttachment(lb_gj, 166, SWT.RIGHT);
			fd_txt_gj.top = new FormAttachment(lb_gj, -8, SWT.TOP);
			fd_txt_gj.bottom = new FormAttachment(lb_gj,0,SWT.BOTTOM);
			fd_txt_gj.left = new FormAttachment(lb_gj, 6);
			txt_gj.setLayoutData(fd_txt_gj);
		}
		
		
		
		//四肢
		{
			lb_sz = toolkit.createLabel(composite_wk, "四肢：", SWT.NONE);
			txt_sz =  toolkit.createText(composite_wk, "", SWT.NONE);
		}
		
		//平跖足
		{
			lb_ptz = toolkit.createLabel(composite_wk, "平跖足：", SWT.NONE);
			txt_ptz =  toolkit.createText(composite_wk, "", SWT.NONE);
		}
		if(man){
			//泌尿生殖器
			{
				lb_szq = toolkit.createLabel(composite_wk, "泌尿生殖器：", SWT.NONE);
				txt_szq = toolkit.createText(composite_wk, "", SWT.NONE);
			}
			
			//肛门
			{
				lb_gm = toolkit.createLabel(composite_wk, "肛门：", SWT.NONE);
				combo_gm = new Combo(composite_wk, SWT.READ_ONLY);
			}
		}else{
			//乳腺
			{
				lb_rx = toolkit.createLabel(composite_wk, "乳腺：", SWT.NONE);
				txt_rx = toolkit.createText(composite_wk, "", SWT.NONE);
			}
			//其他
			{
				lb_wkother = toolkit.createLabel(composite_wk, "其他：", SWT.NONE);
				txt_wkother = toolkit.createText(composite_wk, "", SWT.NONE);
			}
		}
	
		//绘制一行
		{
			List<Control[]> line = new ArrayList<Control[]>();
			Control[] ctl_sz = {lb_sz,txt_sz};
			Control[] ctl_ptz = {lb_ptz,txt_ptz};
			line.add(ctl_sz);
			line.add(ctl_ptz);
			if(man){
				Control[] ctl_szq = {lb_szq,txt_szq};
				Control[] ctl_gm = {lb_gm,combo_gm};
				line.add(ctl_szq);
				line.add(ctl_gm);
			}else{
				Control[] ctl_rx = {lb_rx,txt_rx};
				Control[] ctl_other = {lb_wkother,txt_wkother};
				line.add(ctl_rx);
				line.add(ctl_other);
			}
			Control[] ctl_refer = {lb_lb,lb_jzx,lb_jz,lb_gj}; //相对控件
			DesignUI.drawRow(composite_wk, line, ctl_refer, false);
		}
		
		if(man){
			//疝
			{
				lb_san = toolkit.createLabel(composite_wk, "疝：", SWT.NONE);
				txt_san = toolkit.createText(composite_wk, "", SWT.NONE);
			}
			//其他
			{
				lb_wkother = toolkit.createLabel(composite_wk, "其他：", SWT.NONE);
				txt_wkother = toolkit.createText(composite_wk, "", SWT.NONE);
			}
			//绘制一行
			{
				List<Control[]> line = new ArrayList<Control[]>();
				Control[] ctl_san = {lb_san,txt_san};
				Control[] ctl_wkother = {lb_wkother,txt_wkother};
				line.add(ctl_san);
				line.add(ctl_wkother);
				DesignUI.drawRow(composite_wk, line,lb_sz, false);
			}
		}
	    
		{
			//检查结论
			{
				lb_jl = toolkit.createLabel(composite_wk, "检查结论：", SWT.NONE);
				txt_jl = toolkit.createText(composite_wk, "", SWT.NONE);
			}
			//医生
			{
				lb_ys = toolkit.createLabel(composite_wk, "医生签字：", SWT.NONE);
				txt_ys = toolkit.createText(composite_wk, "", SWT.NONE);
			}
			//绘制一行
			{
				List<Control[]> line = new ArrayList<Control[]>();
				Control[] ctl_jl = {lb_jl,txt_jl};
				Control[] ctl_ys = {lb_ys,txt_ys};
				line.add(ctl_jl);
				line.add(ctl_ys);
				if(man){
					Control[] ctl_refer = {lb_san,lb_wkother}; //相对控件
					DesignUI.drawRow(composite_wk, line,ctl_refer, false);
				}else{
					Control[] ctl_refer = {lb_sz,lb_ptz}; //相对控件
					DesignUI.drawRow(composite_wk, line,ctl_refer, false);
				}
			}
		}
		
		//内科
		List<Control[]> nkcontrolList = new ArrayList<Control[]>();
		UIFormAttachment sectionUIAttachment = UIFormAttachment.getDefault(wkSection,20,180);
		Section nkSection = DesignUI.drawSection(toolkit, scrldfrmNewScrolledform, sectionUIAttachment, "内科");
		Composite composite_nk = DesignUI.drawSectionComposite(toolkit, nkSection);
		//血压
		{
			lb_xy = toolkit.createLabel(composite_nk, "血压：", SWT.NONE);
			txt_xy = toolkit.createText(composite_nk, "", SWT.NONE);
			Label pix = toolkit.createLabel(composite_nk, "mmHg", SWT.NONE);
			Control[] controls = {lb_xy,txt_xy,pix};
			nkcontrolList.add(controls);
		}
		//心率
		{
			lb_xl = toolkit.createLabel(composite_nk, "心率：", SWT.NONE);
			txt_xl = toolkit.createText(composite_nk, "", SWT.NONE);
			Label pix = toolkit.createLabel(composite_nk, "次/分", SWT.NONE);
			Control[] controls = {lb_xl,txt_xl,pix};
			nkcontrolList.add(controls);
		}
		//心
		{
			lb_xin = toolkit.createLabel(composite_nk, "心：", SWT.NONE);
			txt_xin = toolkit.createText(composite_nk, "", SWT.NONE);
			Control[] controls = {lb_xin,txt_xin};
			nkcontrolList.add(controls);
		}
		//肺
		{
			lb_fei = toolkit.createLabel(composite_nk, "肺：", SWT.NONE);
			txt_fei = toolkit.createText(composite_nk, "", SWT.NONE);
			Control[] controls = {lb_fei,txt_fei};
			nkcontrolList.add(controls);
		}
		//神经及精神
		{
			lb_sjjs = toolkit.createLabel(composite_nk, "神经及精神：", SWT.NONE);
			txt_sjjs = toolkit.createText(composite_nk, "", SWT.NONE);
			Control[] controls = {lb_sjjs,txt_sjjs};
			nkcontrolList.add(controls);
		}
		//腹部
		{
			lb_fb = toolkit.createLabel(composite_nk, "腹部：", SWT.NONE);
			txt_fb = toolkit.createText(composite_nk, "", SWT.NONE);
			Control[] controls = {lb_fb,txt_fb};
			nkcontrolList.add(controls);
		}
		//肝
		{
			lb_gan = toolkit.createLabel(composite_nk, "肝：", SWT.NONE);
			txt_gan = toolkit.createText(composite_nk, "", SWT.NONE);
			Control[] controls = {lb_gan,txt_gan};
			nkcontrolList.add(controls);
		}
		//脾
		{
			lb_pi = toolkit.createLabel(composite_nk, "脾：", SWT.NONE);
			txt_pi = toolkit.createText(composite_nk, "", SWT.NONE);
			Control[] controls = {lb_pi,txt_pi};
			nkcontrolList.add(controls);
		}
		DesignUI.drawSecionContent(composite_nk, nkcontrolList,4,true,null);
		
		List<Control[]> lastLine = new ArrayList<Control[]>();
		//检查结论
		{
			lb_jl_nk = toolkit.createLabel(composite_nk, "检查结论：", SWT.NONE);
			txt_jl_nk = toolkit.createText(composite_nk, "", SWT.NONE);
			Control[] controls = {lb_jl_nk,txt_jl_nk};
			lastLine.add(controls);
		}
		//医生
		{
			lb_ys_nk = toolkit.createLabel(composite_nk, "医生签字：", SWT.NONE);
			txt_ys_nk = toolkit.createText(composite_nk, "", SWT.NONE);
			Control[] controls = {lb_ys_nk,txt_ys_nk};
			lastLine.add(controls);
		}
		Control[] ctl_refer = {lb_sjjs,lb_fb}; //相对控件
		DesignUI.drawRow(composite_wk, lastLine,ctl_refer, false);
		
		
		//妇科
		List<Control[]> fkcontrolList = new ArrayList<Control[]>();
		UIFormAttachment fksectionUIAttachment = UIFormAttachment.getDefault(nkSection,20,150);
		Section fkSection = DesignUI.drawSection(toolkit, scrldfrmNewScrolledform, fksectionUIAttachment, "妇科");
		Composite composite_fk = DesignUI.drawSectionComposite(toolkit, fkSection);
		//外阴
		{
			lb_wy = toolkit.createLabel(composite_fk, "外阴：", SWT.NONE);
			txt_wy = toolkit.createText(composite_fk, "", SWT.NONE);
			Control[] controls = {lb_wy,txt_wy};
			fkcontrolList.add(controls);
		}
		//阴道
		{
			lb_yd = toolkit.createLabel(composite_fk, "阴道：", SWT.NONE);
			txt_yd = toolkit.createText(composite_fk, "", SWT.NONE);
			Control[] controls = {lb_yd,txt_yd};
			fkcontrolList.add(controls);
		}
		//宫颈
		{
			lb_gongj = toolkit.createLabel(composite_fk, "宫颈：", SWT.NONE);
			txt_gongj = toolkit.createText(composite_fk, "", SWT.NONE);
			Control[] controls = {lb_gongj,txt_gongj};
			fkcontrolList.add(controls);
		}
		//子宫
		{
			lb_zg = toolkit.createLabel(composite_fk, "子宫：", SWT.NONE);
			txt_zg = toolkit.createText(composite_fk, "", SWT.NONE);
			Control[] controls = {lb_zg,txt_zg};
			fkcontrolList.add(controls);
		}
		DesignUI.drawSecionContent(composite_fk, fkcontrolList, 4);

		List<Control[]> newLine = new ArrayList<Control[]>();
		//附件
		{
			lb_fuj = toolkit.createLabel(composite_fk, "附件：", SWT.NONE);
			txt_fuj = toolkit.createText(composite_fk, "", SWT.NONE);
			Control[] controls = {lb_fuj,txt_fuj};
			newLine.add(controls);
		}
	
		//检查结论
		{
			lb_jl_fk = toolkit.createLabel(composite_fk, "检查结论：", SWT.NONE);
			txt_jl_fk = toolkit.createText(composite_fk, "", SWT.NONE);
			Control[] controls = {lb_jl_fk,txt_jl_fk};
			newLine.add(controls);
		}
		//医生
		{
			lb_ys_fk = toolkit.createLabel(composite_fk, "医生签字：", SWT.NONE);
			txt_ys_nk = toolkit.createText(composite_fk, "", SWT.NONE);
			Control[] controls = {lb_ys_fk,txt_ys_nk};
			newLine.add(controls);
		}
		Control[] ctl_referfk = {lb_wy,lb_yd,lb_gongj}; //相对控件
		DesignUI.drawRow(composite_fk, newLine,ctl_referfk, false);
		
	
		//五官科
		UIFormAttachment wgksectionUIAttachment = UIFormAttachment.getDefault(fkSection,20,200);
		Section wgkSection = DesignUI.drawSection(toolkit, scrldfrmNewScrolledform, wgksectionUIAttachment, "五官科");
		Composite composite_wgk = DesignUI.drawSectionComposite(toolkit, wgkSection);
		
		//裸眼视力  左 右
		{
			lb_lyz = toolkit.createLabel(composite_wgk, "裸眼视力（左/右）：", SWT.NONE);
			txt_lyz = toolkit.createText(composite_wgk, "", SWT.NONE);
			lb_lyy = toolkit.createLabel(composite_wgk, "/", SWT.NONE);
			txt_lyy = toolkit.createText(composite_wgk, "", SWT.NONE);
			Control[] controls = {lb_lyz,txt_lyz,lb_lyy,txt_lyy};
			DesignUI.drawItem(composite_wgk, controls, true, false, null,150);
			
		}
		
		//矫正视力   左  右
		{
			lb_jzz = toolkit.createLabel(composite_wgk, "矫正视力（左/右）：", SWT.NONE);
			txt_jzz = toolkit.createText(composite_wgk, "", SWT.NONE);
			lb_jzy = toolkit.createLabel(composite_wgk, "/", SWT.NONE);
			txt_jzy = toolkit.createText(composite_wgk, "", SWT.NONE);
			Control[] controls = {lb_jzz,txt_jzz,lb_jzy,txt_jzy};
			DesignUI.drawItem(composite_wgk, controls, false, false, txt_lyy,150);
			
		}
		List<Control[]> wgkcontrolList = new ArrayList<Control[]>();
		//耳
		{
			lb_er = toolkit.createLabel(composite_wgk, "      耳：", SWT.NONE);
			txt_er = toolkit.createText(composite_wgk, "", SWT.NONE);
			Control[] controls = {lb_er,txt_er};
			wgkcontrolList.add(controls);
		}
		//鼻
		{
			lb_bi = toolkit.createLabel(composite_wgk, "   鼻：", SWT.NONE);
			txt_bi = toolkit.createText(composite_wgk, "", SWT.NONE);
			Control[] controls = {lb_bi,txt_bi};
			wgkcontrolList.add(controls);
		}
		//口腔咽喉
		{
			lb_kou = toolkit.createLabel(composite_wgk, "口腔：", SWT.NONE);
			txt_kou = toolkit.createText(composite_wgk, "", SWT.NONE);
			Control[] controls = {lb_kou,txt_kou};
			wgkcontrolList.add(controls);
		}
		DesignUI.drawRow(composite_wgk,wgkcontrolList,lb_lyz,true,true);
		List<Control[]> newLineWgk = new ArrayList<Control[]>();
		//检查结论
		{
			lb_jl_wgk = toolkit.createLabel(composite_wgk, "检查结论：", SWT.NONE);
			txt_jl_wgk = toolkit.createText(composite_wgk, "", SWT.NONE);
			Control[] controls = {lb_jl_wgk,txt_jl_wgk};
			newLineWgk.add(controls);
		}
		//医生
		{
			lb_ys_wgk = toolkit.createLabel(composite_wgk, "医生签字：", SWT.NONE);
			txt_ys_wgk = toolkit.createText(composite_wgk, "", SWT.NONE);
			Control[] controls = {lb_ys_wgk,txt_ys_wgk};
			newLineWgk.add(controls);
		}
		Control[] ctl_referwgk = {lb_er,lb_bi}; //相对控件
		DesignUI.drawRow(composite_wgk, newLineWgk,ctl_referwgk, false);
		
		//辅助检查
		UIFormAttachment fzjcsectionUIAttachment = UIFormAttachment.getDefault(wgkSection,20,400);
		Section fzjcSection = DesignUI.drawSection(toolkit, scrldfrmNewScrolledform, fzjcsectionUIAttachment, "辅助检查");
		Composite composite_fzjc = DesignUI.drawSectionComposite(toolkit, fzjcSection);
		List<Control[]> fxxccontrolList = new ArrayList<Control[]>();
		//肺X线
		{
			lb_fxx = toolkit.createLabel(composite_fzjc, "   肺X线：", SWT.NONE);
			txt_fxx = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_fxx,txt_fxx};
			fxxccontrolList.add(controls);
		}
		//医生签字
		{
			lb_fxx_ysjz = toolkit.createLabel(composite_fzjc, "医生签字：", SWT.NONE);
			txt_fxx_ysjz = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_fxx_ysjz,txt_fxx_ysjz};
			fxxccontrolList.add(controls);
		}
		//心电图
		{
			lb_xdt = toolkit.createLabel(composite_fzjc, "心电图：", SWT.NONE);
			txt_xdt = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_xdt,txt_xdt};
			fxxccontrolList.add(controls);
		}
		//心电图 医生签字
		{
			lb_xdt_ysjz = toolkit.createLabel(composite_fzjc, "医生签字：", SWT.NONE);
			txt_xdt_ysjz = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_xdt_ysjz,txt_xdt_ysjz};
			fxxccontrolList.add(controls);
		}
		//B超
		{
			lb_bc = toolkit.createLabel(composite_fzjc, "   B超：", SWT.NONE);
			txt_bc = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_bc,txt_bc};
			fxxccontrolList.add(controls);
		}
		//B超医生
		{
			lb_bc_ysqz = toolkit.createLabel(composite_fzjc, "医生签字：", SWT.NONE);
			txt_bc_ysqz = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_bc_ysqz,txt_bc_ysqz};
			fxxccontrolList.add(controls);
		}
		//空腹血糖
		{
			lb_kfxt = toolkit.createLabel(composite_fzjc, "空腹血糖：", SWT.NONE);
			txt_kfxt = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Label mmol = toolkit.createLabel(composite_fzjc, "mmol/L", SWT.NONE);
			Control[] controls = {lb_kfxt,txt_kfxt,mmol};
			fxxccontrolList.add(controls);
		}
		//空腹血糖 医生
		{
			lb_kfxt_ysqz = toolkit.createLabel(composite_fzjc, "医生签字：", SWT.NONE);
			txt_kfxt_ysqz = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_kfxt_ysqz,txt_kfxt_ysqz};
			fxxccontrolList.add(controls);
		}
		DesignUI.drawSecionContent(composite_fzjc, fxxccontrolList, 4,true,null);
		
		//甘油三酯值(mmol/L)
		{
			lb_xz = toolkit.createLabel(composite_fzjc, "血脂(甘油三酯值(mmol/L)/总胆固醇值(mmol/L))：", SWT.NONE);
			txt_gyz = toolkit.createText(composite_fzjc, "", SWT.NONE);
			lb_xg = toolkit.createLabel(composite_fzjc, "/", SWT.NONE);
			txt_zdgc = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_xz,txt_gyz,lb_xg,txt_zdgc};
			DesignUI.drawItem(composite_fzjc, controls, true, true,lb_bc,95);
		}
		
		//血脂 医生签字
		{
			lb_xz_ysqz = toolkit.createLabel(composite_fzjc, "医生签字：", SWT.NONE);
			txt_xz_ysqz = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_xz_ysqz,txt_xz_ysqz};
			 
			DesignUI.drawItem(composite_fzjc, controls, false, true,lb_kfxt);
		}
		
		//乙肝病毒血清标志物
		{
			
			group = new Group(composite_fzjc, SWT.NONE);
			FormData fd_group = new FormData();
			fd_group.top = new FormAttachment(lb_xz,40,SWT.TOP);
			fd_group.left = new FormAttachment(0);
			fd_group.right = new FormAttachment(txt_xz_ysqz,0,SWT.RIGHT);
			fd_group.bottom = new FormAttachment(txt_xz_ysqz,110,SWT.BOTTOM);
			group.setLayoutData(fd_group);
			group.setText("乙肝病毒血清标志物");
			group.setLayout(new FormLayout());
			
			lb_HBsAg = toolkit.createLabel(group, "HBsAg：", SWT.NONE);
			FormData fd_lb_HBsAg = new FormData();
			fd_lb_HBsAg.top = new FormAttachment(0,20);
			fd_lb_HBsAg.left = new FormAttachment(0,20);
			lb_HBsAg.setLayoutData(fd_lb_HBsAg);
			
			combo_HBsAg = new Combo(group,SWT.READ_ONLY);
			FormData fd_HBsAg = new FormData();
			fd_HBsAg.top = new FormAttachment(lb_HBsAg,-8,SWT.TOP);
			fd_HBsAg.bottom = new FormAttachment(lb_HBsAg,0,SWT.BOTTOM);
			fd_HBsAg.right = new FormAttachment(lb_HBsAg,66, SWT.RIGHT);
			fd_HBsAg.left = new FormAttachment(lb_HBsAg, 6);
			combo_HBsAg.setLayoutData(fd_HBsAg);
			toolkit.adapt(combo_HBsAg);
			toolkit.paintBordersFor(combo_HBsAg);
			
			lb_HBeAg = toolkit.createLabel(group, "HBeAg：", SWT.NONE);
			FormData fd_lb_HBeAg = new FormData();
			fd_lb_HBeAg.top = new FormAttachment(lb_HBsAg,0,SWT.TOP);
			fd_lb_HBeAg.left = new FormAttachment(combo_HBsAg,27);
			lb_HBeAg.setLayoutData(fd_lb_HBeAg);
			
			combo_HBeAg = new Combo(group,SWT.READ_ONLY);
			FormData fd_combo_HBeAg = new FormData();
			fd_combo_HBeAg.top = new FormAttachment(lb_HBeAg,-8,SWT.TOP);
			fd_combo_HBeAg.bottom = new FormAttachment(lb_HBeAg,0,SWT.BOTTOM);
			fd_combo_HBeAg.right = new FormAttachment(lb_HBeAg,66, SWT.RIGHT);
			fd_combo_HBeAg.left = new FormAttachment(lb_HBeAg, 6);
			combo_HBeAg.setLayoutData(fd_combo_HBeAg);
			toolkit.adapt(combo_HBeAg);
			toolkit.paintBordersFor(combo_HBeAg);
			
			lb_HbsAb = toolkit.createLabel(group, "HbsAb：", SWT.NONE);
			FormData fd_lb_HbsAb = new FormData();
			fd_lb_HbsAb.top = new FormAttachment(lb_HBeAg,0,SWT.TOP);
			fd_lb_HbsAb.left = new FormAttachment(combo_HBeAg,27);
			lb_HbsAb.setLayoutData(fd_lb_HbsAb);
			
			combo_HbsAb = new Combo(group,SWT.READ_ONLY);
			FormData fd_combo_HbsAb = new FormData();
			fd_combo_HbsAb.top = new FormAttachment(lb_HbsAb,-8,SWT.TOP);
			fd_combo_HbsAb.bottom = new FormAttachment(lb_HbsAb,0,SWT.BOTTOM);
			fd_combo_HbsAb.right = new FormAttachment(lb_HbsAb,66, SWT.RIGHT);
			fd_combo_HbsAb.left = new FormAttachment(lb_HbsAb, 6);
			combo_HbsAb.setLayoutData(fd_combo_HbsAb);
			toolkit.adapt(combo_HbsAb);
			toolkit.paintBordersFor(combo_HbsAb);
			
			lb_HbeAb = toolkit.createLabel(group, "HbeAb：", SWT.NONE);
			FormData fd_lb_HbeAb = new FormData();
			fd_lb_HbeAb.top = new FormAttachment(lb_HbsAb,0,SWT.TOP);
			fd_lb_HbeAb.left = new FormAttachment(combo_HbsAb,27);
			lb_HbeAb.setLayoutData(fd_lb_HbeAb);
			
			combo_HbeAb = new Combo(group,SWT.READ_ONLY);
			FormData fd_combo_HbeAb = new FormData();
			fd_combo_HbeAb.top = new FormAttachment(lb_HbeAb,-8,SWT.TOP);
			fd_combo_HbeAb.bottom = new FormAttachment(lb_HbeAb,0,SWT.BOTTOM);
			fd_combo_HbeAb.right = new FormAttachment(lb_HbeAb,66, SWT.RIGHT);
			fd_combo_HbeAb.left = new FormAttachment(lb_HbeAb, 6);
			combo_HbeAb.setLayoutData(fd_combo_HbeAb);
			toolkit.adapt(combo_HbeAb);
			toolkit.paintBordersFor(combo_HbeAb);
			
			lb_HBcAb = toolkit.createLabel(group, "HBcAb：", SWT.NONE);
			FormData fd_lb_HBcAb = new FormData();
			fd_lb_HBcAb.top = new FormAttachment(lb_HbeAb,0,SWT.TOP);
			fd_lb_HBcAb.left = new FormAttachment(combo_HbeAb,27);
			lb_HBcAb.setLayoutData(fd_lb_HBcAb);
			
			combo_HBcAb = new Combo(group,SWT.READ_ONLY);
			FormData fd_combo_HBcAb = new FormData();
			fd_combo_HBcAb.top = new FormAttachment(lb_HBcAb,-8,SWT.TOP);
			fd_combo_HBcAb.bottom = new FormAttachment(lb_HBcAb,0,SWT.BOTTOM);
			fd_combo_HBcAb.right = new FormAttachment(lb_HBcAb,66, SWT.RIGHT);
			fd_combo_HBcAb.left = new FormAttachment(lb_HBcAb, 6);
			combo_HBcAb.setLayoutData(fd_combo_HBcAb);
			toolkit.adapt(combo_HBcAb);
			toolkit.paintBordersFor(combo_HBcAb);
			
			

		}
		
		//乙肝病毒血清标志物  医生签字
		{
			lb_ygbzw_ysqz = toolkit.createLabel(composite_fzjc, "医生签字：", SWT.NONE);
			FormData fd_ygbzw_ysqz = new FormData();
			fd_ygbzw_ysqz.top = new FormAttachment(group,0,SWT.TOP);
			fd_ygbzw_ysqz.left = new FormAttachment(lb_kfxt_ysqz,0, SWT.LEFT);
			lb_ygbzw_ysqz.setLayoutData(fd_ygbzw_ysqz);
			
			txt_ygbzw_ysqz = toolkit.createText(composite_fzjc, "", SWT.NONE);
			FormData fd_text_ysqz = new FormData();
			fd_text_ysqz.right = new FormAttachment(lb_ygbzw_ysqz, 166, SWT.RIGHT);
			fd_text_ysqz.top = new FormAttachment(lb_ygbzw_ysqz, -8, SWT.TOP);
			fd_text_ysqz.bottom = new FormAttachment(lb_ygbzw_ysqz,0,SWT.BOTTOM);
			fd_text_ysqz.left = new FormAttachment(lb_ygbzw_ysqz, 6);
			txt_ygbzw_ysqz.setLayoutData(fd_text_ysqz);
		}
		List<Control[]> fxxclastlList = new ArrayList<Control[]>();
		//肝功能
		{
			lb_ggn = toolkit.createLabel(composite_fzjc, "   肝功能：", SWT.NONE);
			txt_ggn = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_ggn,txt_ggn};
			fxxclastlList.add(controls);
		}
		//肝功能 医生
		{
			lb_ggn_ysqz = toolkit.createLabel(composite_fzjc, "医生签字：", SWT.NONE);
			txt_ggn_ysqz = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_ggn_ysqz,txt_ggn_ysqz};
			fxxclastlList.add(controls);
		}
		//血常规
		{
			lb_xcg = toolkit.createLabel(composite_fzjc, "血常规：", SWT.NONE);
			txt_xcg = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_xcg,txt_xcg};
			fxxclastlList.add(controls);
		}
		//血常规 医生
		{
			lb_xcg_ysqz = toolkit.createLabel(composite_fzjc, "医生签字：", SWT.NONE);
			txt_xcg_ysqz = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_xcg_ysqz,txt_xcg_ysqz};
			fxxclastlList.add(controls);
		}
		
		//尿常规
		{
			lb_ncg = toolkit.createLabel(composite_fzjc, "   尿常规：", SWT.NONE);
			txt_ncg = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_ncg,txt_ncg};
			fxxclastlList.add(controls);
		}
		//尿常规 医生
		{
			lb_ncg_ysqz = toolkit.createLabel(composite_fzjc, "医生签字：", SWT.NONE);
			txt_ncg_ysqz = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_ncg_ysqz,txt_ncg_ysqz};
			fxxclastlList.add(controls);
		}
		//粪常规
		{
			lb_fcg = toolkit.createLabel(composite_fzjc, "粪常规：", SWT.NONE);
			txt_fcg = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_fcg,txt_fcg};
			fxxclastlList.add(controls);
		}
		//粪常规 医生
		{
			lb_fcg_ysqz = toolkit.createLabel(composite_fzjc, "医生签字：", SWT.NONE);
			txt_fcg_ysqz = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_fcg_ysqz,txt_fcg_ysqz};
			fxxclastlList.add(controls);
		}
		//其他
		{
			lb_qt = toolkit.createLabel(composite_fzjc, "   其他：", SWT.NONE);
			txt_qt = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_qt,txt_qt};
			fxxclastlList.add(controls);
		}
		// 其他 医生
		{
			lb_qt_ysqz = toolkit.createLabel(composite_fzjc, "医生签字：", SWT.NONE);
			txt_qt_ysqz = toolkit.createText(composite_fzjc, "", SWT.NONE);
			Control[] controls = {lb_qt_ysqz,txt_qt_ysqz};
			fxxclastlList.add(controls);
		}
		DesignUI.oneDefaultTop = 200;
		DesignUI.drawSecionContent(composite_fzjc, fxxclastlList, 4,true,lb_bc);
		DesignUI.oneDefaultTop = 40;
		
		//最后检查结论
		{
			lb_jcjl = toolkit.createLabel(composite_fzjc, "检查结论：", SWT.NONE);
			FormData fd_jcjl = new FormData();
			fd_jcjl.top = new FormAttachment(lb_qt,40,SWT.TOP);
			fd_jcjl.right = new FormAttachment(lb_qt,0,SWT.RIGHT);
			lb_jcjl.setLayoutData(fd_jcjl);
			
			txt_jcjl =  toolkit.createText(composite_fzjc, "", SWT.WRAP|SWT.MULTI|SWT.V_SCROLL);
			FormData fd_txt_jcjl = new FormData();
			fd_txt_jcjl.right = new FormAttachment(txt_qt_ysqz, 0, SWT.RIGHT);
			fd_txt_jcjl.top = new FormAttachment(lb_jcjl,0, SWT.TOP);
			fd_txt_jcjl.bottom = new FormAttachment(lb_jcjl,60,SWT.BOTTOM);
			fd_txt_jcjl.left = new FormAttachment(lb_jcjl, 6);
			txt_jcjl.setLayoutData(fd_txt_jcjl);
		}
		// 主检医生签名
		{
			lb_zjys = toolkit.createLabel(composite_fzjc, "主检医生：", SWT.NONE);
			FormData fd_zjys = new FormData();
			fd_zjys.top = new FormAttachment(lb_jcjl,0,SWT.TOP);
			fd_zjys.right = new FormAttachment(lb_fcg,0,SWT.RIGHT);
			lb_zjys.setLayoutData(fd_zjys);
			txt_zjys = toolkit.createText(composite_fzjc, "", SWT.NONE);
			FormData fd_txt_zjys = new FormData();
			fd_txt_zjys.right = new FormAttachment(lb_zjys, 166, SWT.RIGHT);
			fd_txt_zjys.top = new FormAttachment(lb_zjys, -8, SWT.TOP);
			fd_txt_zjys.bottom = new FormAttachment(lb_zjys,0,SWT.BOTTOM);
			fd_txt_zjys.left = new FormAttachment(lb_zjys, 6);
			txt_zjys.setLayoutData(fd_txt_zjys);
		}

		scrolledComposite.setContent(scrldfrmNewScrolledform);
		scrolledComposite.setMinSize(scrldfrmNewScrolledform.computeSize(SWT.DEFAULT, SWT.DEFAULT));
	
	}

	protected void doExport() {

	}

	protected void doExit() {
		getViewSite().getPage().hideView(this);
	}

 

	protected abstract void doCancel();

	protected abstract void doSave();

	protected abstract void doDel();

	protected abstract void doEdit();

	protected abstract void doAdd();

	protected abstract void doPrint();

	/**
	 * Create the actions.
	 */
	private void createActions() {
		 
	}

	/**
	 * Initialize the toolbar.
	 */
	private void initializeToolBar() {
		@SuppressWarnings("unused")
		IToolBarManager toolbarManager = getViewSite().getActionBars().getToolBarManager();
	}

	/**
	 * Initialize the menu.
	 */
	private void initializeMenu() {
		@SuppressWarnings("unused")
		IMenuManager menuManager = getViewSite().getActionBars().getMenuManager();
	}
    
	public void initCombo(){
		CommonUtils.initCombo(combo_pf, "PIFU");
		CommonUtils.initCombo(combo_lb, "LINBA");
		CommonUtils.initCombo(combo_gm, "GANGM");
		
		CommonUtils.initCombo(combo_HBcAb, "YXYX");
		CommonUtils.initCombo(combo_HbeAb, "YXYX");
		CommonUtils.initCombo(combo_HBeAg, "YXYX");
		CommonUtils.initCombo(combo_HbsAb, "YXYX");
		CommonUtils.initCombo(combo_HBsAg, "YXYX");
	    CommonUtils.initUserCombo(combo_zrys, SuperContext.currentUser.getUserName(),true);
		
		
	}
	

}
